<?php

require_once "core/application/models/mpremiums/mpremiums2.php";

class Mpremium3 extends Mpremium2 {

    private $_query;
    private $_fetch = array();

    protected function testAlreadyPremium($account) {
        /**
         *  уже премиум?
         * @param string $account
         */
        DB::getInstance()->openConnectionToLS();
        $this->_query = "SELECT `membership` from `account_data` WHERE `name` = '$account' ";
        $this->_fetch = mysql_fetch_assoc(DB::getInstance()->sql($this->_query));
        if ($this->_fetch['membership'] != '0') {
            return true;
            DB::getInstance()->closeConnection();
            unset($this->_query);
        } else {
            return false;
            DB::getInstance()->closeConnection();
            unset($this->_query, $this->_fetch);
        }
    }

}

?>